From 38811018fb3531aeb3ea4288704ac1519ac6de91 Mon Sep 17 00:00:00 2001 From: justbur Date: Sun, 20 Dec 2015 15:54:53 -0500 Subject: [PATCH] Allow traversal of keymaps in new commands --- which-key.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index e5ca81dcc1f..0fdf6fe6255 100644 --- a/which-key.el +++ b/which-key.el @@ -1869,7 +1869,13 @@ is selected interactively by mode in `minor-mode-map-alist'." formatted-keys 0 which-key-side-window-location))) (t (setq which-key--pages-plist (which-key--create-pages formatted-keys (window-width))) - (which-key--show-page 0)))))) + (which-key--show-page 0))))) + (let* ((key (string (read-key))) + (next-def (lookup-key keymap key))) + (if (keymapp next-def) + (progn (which-key--hide-popup-ignore-command) + (which-key--show-keymap next-def)) + (which-key--hide-popup)))) (defun which-key--create-buffer-and-show (&optional prefix-keys) "Fill `which-key--buffer' with key descriptions and reformat. -- 2.30.2